aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/utils.c
Commit message (Collapse)AuthorAgeFilesLines
...
* | lavc: override decode return value only in case of errorClément Bœsch2016-05-011-1/+3
| | | | | | | | | | | | Fixes Ticket #5350 Regression since 29412821241050c846dbceaad4b9752857659977.
* | avcodec/utils: split side-data in new decode API toowm42016-04-291-4/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The deprecated avcodec_decode_video2() and avcodec_decode_audio4() functions called av_packet_split_side_data() on the input packets. This is required for packets produced by libavformat with the AVFMT_FLAG_KEEP_SIDE_DATA flag unset (which is unfortunately the default). The new API didn't do this yet, although it didn't matter as no decoder supports the new API yet. The emulation layer for the old API calls the old API functions, which took care of the splitting. Add this code to the new API codec entrypoints too, because we shouldn't send essentially corrupted data to decoders.
* | avcodec/utils: Assert that the number of consumed bytes in ↵Michael Niedermayer2016-04-231-0/+2
| | | | | | | | | | | | avcodec_decode_audio4() is <= the input size Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | avcodec/utils: fix minor memory leaks on avcodec_open2() failurewm42016-04-221-0/+2
| |
* | lavc: introduce a new decoding/encoding API with decoupled input/outputwm42016-04-211-2/+287
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Until now, the decoding API was restricted to outputting 0 or 1 frames per input packet. It also enforces a somewhat rigid dataflow in general. This new API seeks to relax these restrictions by decoupling input and output. Instead of doing a single call on each decode step, which may consume the packet and may produce output, the new API requires the user to send input first, and then ask for output. For now, there are no codecs supporting this API. The API can work with codecs using the old API, and most code added here is to make them interoperate. The reverse is not possible, although for audio it might. From Libav commit 05f66706d182eb0c36af54d72614bf4c33e957a9. Signed-off-by: Anton Khirnov <anton@khirnov.net>
* | avcodec: Add avpriv_codec_get_cap_skip_frame_fill_param()Michael Niedermayer2016-04-211-0/+4
| | | | | | | | | | | | With this the use of the caps_internal from libavformat can be avoided Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | avcodec/utils: Add braces to framecount computationMichael Niedermayer2016-04-151-1/+1
| | | | | | | | | | Suggestes-by: ubitux Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | avcodec/utils: Fix duration of ATRAC3 packetsMichael Niedermayer2016-04-151-1/+2
| | | | | | | | | | | | Fixes ticket1680 Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | avcodec: Add bits_per_raw_sample to AVCodecParametersMichael Niedermayer2016-04-151-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The bits_per_raw_sample represents the number of bits of precision per sample. The field is added at the logical place, not at the end as the code was just recently added This fixes the regression about losing the audio sample precision information The change in the fate test checksum un-does the change from the merge Previous version reviewed by: wm4 <nfxjfg@googlemail.com> Previous version reviewed by: Dominik 'Rathann' Mierzejewski <dominik@greysector.net> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | avcodec: add adpcm dat4 decoderPaul B Mahol2016-04-051-0/+1
| | | | | | | | Signed-off-by: Paul B Mahol <onemda@gmail.com>
* | avcodec: properly initialize AVCodecParameters profile/levelHendrik Leppkes2016-04-021-0/+2
| | | | | | | | Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
* | lavc/utils: use pkt_timebase for legacy subtitles timing codeClément Bœsch2016-04-021-2/+5
| | | | | | | | This is consistent with other AVSubtitle timing adjustments.
* | lavc: factor apply_param_change() AV_EF_EXPLODE handlingwm42016-04-011-15/+19
| | | | | | | | Remove the duplicated code for handling failure of apply_param_change().
* | lavc/utils: transfer width/height for subs in codecparClément Bœsch2016-03-311-0/+8
| | | | | | | | Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
* | codecpar: Add video delay fieldDerek Buitenhuis2016-03-311-0/+2
| | | | | | | | Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
* | Add frame_size to AVCodecParametersHendrik Leppkes2016-03-311-0/+2
| | | | | | | | Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
* | lavc: Add seek_preroll to AVCodecParametersJames Almer2016-03-311-0/+2
| | | | | | | | Signed-off-by: James Almer <jamrial@gmail.com>
* | Merge commit 'a8068346e48e123f8d3bdf4d64464d81e53e5fc7'Derek Buitenhuis2016-03-311-18/+31
|\| | | | | | | | | | | | | | | | | * commit 'a8068346e48e123f8d3bdf4d64464d81e53e5fc7': lavc: add a variant of av_get_audio_frame_duration working with AVCodecParameters Fixes from jamrial incorporated. Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
| * lavc: add a variant of av_get_audio_frame_duration working with ↵Anton Khirnov2016-02-231-12/+22
| | | | | | | | AVCodecParameters
* | Merge commit '998e1b8f521b73e1ed3a13caaabcf79eb401cf0d'Derek Buitenhuis2016-03-311-0/+152
|\| | | | | | | | | | | | | | | | | | | | | * commit '998e1b8f521b73e1ed3a13caaabcf79eb401cf0d': lavc: add codec parameters API Fixes added in: - bit_rate has been made int64_t to match. - profile and level are properly initialize. Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
| * lavc: add codec parameters APIAnton Khirnov2016-02-231-0/+152
| | | | | | | | | | | | This API is intended to allow passing around codec parameters without using full AVCodecContext (which also contains codec options and encoder/decoder state).
* | avcodec/utils: fix packet duration of frames with discarded paddingsMarton Balint2016-03-281-2/+1
| | | | | | | | | | Reviewed-by: Hendrik Leppkes <h.leppkes@gmail.com> Signed-off-by: Marton Balint <cus@passwd.hu>
* | lavc/utils: fix extra ASS sanity check in convert_sub_to_old_ass_form()Clément Bœsch2016-03-071-1/+1
| |
* | avcodec/utils: Fix memleak on error in convert_sub_to_old_ass_form()Michael Niedermayer2016-03-051-0/+1
| | | | | | | | | | | | Fixes CID1355116 Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | avcodec/utils: Fix 'ISO C90 forbids mixed declarations and code'Michael Niedermayer2016-03-031-1/+1
| | | | | | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | avcodec: Add utils testMichael Niedermayer2016-02-291-0/+20
| | | | | | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | Document and validate AVFrame plane pointers.Reimar Döffinger2016-02-281-0/+26
| | | | | | | | | | | | | | | | | | | | Check that the required plane pointers and only those are set up. Currently does not enforce anything for the palette pointer of pseudopal formats as I am unsure about the requirements. Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
* | avcodec/utils: Check that the video data[] arrays are NULL on the input to ↵Michael Niedermayer2016-02-271-0/+5
| | | | | | | | | | | | | | | | | | get_buffer_internal() This should return an error to the decoder if the struct it tried to getbuffer is dirty Reviewed-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | avcodec/utils: Check all data[] pointers in video_get_buffer() not just the ↵Michael Niedermayer2016-02-271-2/+2
| | | | | | | | | | | | first Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | lavc: deprecate decoded ass subtitles with timingsClément Bœsch2016-02-261-0/+4
| |
* | lavc: allow subtitle text format to be ASS without timingClément Bœsch2016-02-261-0/+74
| |
* | avcodec/utils: Merge identical if conditionsMichael Niedermayer2016-02-261-2/+1
| | | | | | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | libavcodec:add packet level support for mastering metadataNeil Birkbeck2016-02-251-4/+5
| | | | | | | | | | | | | | | | | | Some containers, like webm/mkv, will contain this mastering metadata. This is analogous to the way 3D fpa data is handled (in frame and packet side data). Signed-off-by: Neil Birkbeck <neil.birkbeck@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | Merge commit '7b3214d0050613bd347a2e41c9f78ffb766da25e'Derek Buitenhuis2016-02-241-0/+13
|\| | | | | | | | | | | | | * commit '7b3214d0050613bd347a2e41c9f78ffb766da25e': lavc: add a field for passing AVHWFramesContext to encoders Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
| * lavc: add a field for passing AVHWFramesContext to encodersAnton Khirnov2016-02-141-0/+13
| |
* | Add GBRAP12 pixel formatKieran Kunhya2016-02-241-0/+2
| | | | | | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | avcodec: Fix a typo.Carl Eugen Hoyos2016-02-141-1/+1
| |
* | avcodec: only warn about hwaccel with frame threadsAndreas Cadhalpun2016-02-141-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | VLC uses hwaccel with frame threads and it works fine, but returning an error here made it fail. This regression was introduced in commit 31741ae. Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com> Warning message text by nevcairiel Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | avcodec/utils: Add AV_PIX_FMT_GBRAP16?E to avcodec_align_dimensions2()Michael Niedermayer2016-02-071-0/+2
| | | | | | | | | | Found-by: kierank Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | avcodec/utils: Check the return code of av_image_fill_linesizes()Michael Niedermayer2016-02-031-1/+3
| | | | | | | | | | | | Fixes CID1271741 Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | lavc/utils: fix instanciate/instantiate typoClément Bœsch2016-01-301-1/+1
| |
* | libavcodec/util: Fix timebase overflow checkDerek Buitenhuis2016-01-271-1/+1
| | | | | | | | | | | | It could accidentally divide by zero if num was zero. Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
* | Merge commit '7486418683bd2477772e03aab573cf846c12fb0d'Derek Buitenhuis2016-01-271-0/+10
|\| | | | | | | Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
| * lavc: Make sure that the effective timebase would not overflowArttu Ylä-Outinen2016-01-191-0/+10
| | | | | | | | | | | | | | In the unlikely situation the user decides to set ticks_per_frame and timebase to a value large enough to overflow. Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
* | avutil: Rename FF_CEIL_COMPAT to AV_CEIL_COMPATDerek Buitenhuis2016-01-271-6/+6
| | | | | | | | | | | | | | | | | | | | Libav, for some reason, merged this as a public API function. This will aid in future merges. A define is left for backwards compat, just in case some person used it, since it is in a public header. Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
* | avcodec/utils: run ff_frame_thread_encoder_init() only for encodersMichael Niedermayer2016-01-251-1/+1
| | | | | | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | Print the whitelists if entities are not found on themMichael Niedermayer2016-01-241-1/+1
| | | | | | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | avcodec/utils: Check bits_per_raw_sample on video encoder openMichael Niedermayer2016-01-071-0/+8
| | | | | | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | Merge commit 'cea1eef25c3310a68dd327eb74aae14ad3c2ddef'Hendrik Leppkes2016-01-011-10/+1
|\| | | | | | | | | | | | | * commit 'cea1eef25c3310a68dd327eb74aae14ad3c2ddef': lavc: get the profile name through the codec descriptor in avcodec_string() Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
| * lavc: get the profile name through the codec descriptor in avcodec_string()Anton Khirnov2015-12-121-11/+1
| |