Michael Niedermayer
ec464c9683
avcodec/utils: av_register_codec & hwaccel() that work in O(1) time
...
Its possible to implement this with a few lines less code but it then
would flip the order of the list and require registration of external
codecs to be done first, also it could break user applications due to
this. Thus to maintain ABI this slighty more complex solution is
used.
Reviewed-by: Stefano Sabatini
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-17 01:06:34 +01:00
Michael Niedermayer
44967ab60a
Merge commit 'd7b3ee9a3a03ab88d61a5895fbdbc6689f4dd671'
...
* commit 'd7b3ee9a3a03ab88d61a5895fbdbc6689f4dd671':
lavc: deprecate avcodec_get_frame_defaults().
Conflicts:
libavcodec/version.h
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-12 00:32:15 +01:00
Michael Niedermayer
27e7977982
Merge commit '95a8a5aca60ce37d3abdf121a0285c2e317cf521'
...
* commit '95a8a5aca60ce37d3abdf121a0285c2e317cf521':
lavc: call av_frame_unref() instead of avcodec_get_frame_defaults().
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-11 23:41:27 +01:00
Michael Niedermayer
409a143e4b
Merge commit '943135621830ac3857d3cf766cfc280a95bb3c13'
...
* commit '943135621830ac3857d3cf766cfc280a95bb3c13':
lavc: deprecate avcodec_free_frame()
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-11 23:24:48 +01:00
Anton Khirnov
d7b3ee9a3a
lavc: deprecate avcodec_get_frame_defaults().
...
Also bump libavcodec micro and add an APIchanges entry saying that
av_frame_* should now be used instead of the lavc AVFrame functions.
2013-12-11 20:39:55 +01:00
Anton Khirnov
95a8a5aca6
lavc: call av_frame_unref() instead of avcodec_get_frame_defaults().
...
avcodec_get_frame_defaults() will be deprecated.
2013-12-11 20:39:55 +01:00
Anton Khirnov
9431356218
lavc: deprecate avcodec_free_frame()
...
av_frame_free() should be used instead.
2013-12-11 20:39:54 +01:00
Michael Niedermayer
b6eee405ff
avcodec/utils: Print warning if avcodec_set_dimensions() failed
...
Fixes CID1135744
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-11 15:28:27 +01:00
Michael Niedermayer
985c5f226a
avcodec/utils: check that extended data has been set correctly instead of forcing it in avcodec_decode_video2()
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-10 01:11:32 +01:00
Michael Niedermayer
999ee28124
avcodec/utils: dont depend on the channel layout in unrefcount_frame()
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-10 01:11:32 +01:00
Michael Niedermayer
7a901eb33a
Merge commit '37a749012aaacc801fe860428417a6d7b81c103f'
...
* commit '37a749012aaacc801fe860428417a6d7b81c103f':
lavc: rework handling of refcounted_frames=0
Conflicts:
libavcodec/utils.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-09 19:37:53 +01:00
Michael Niedermayer
f3acdd44bf
Merge commit 'a1ee1648690726b34e98eaf8db04fd7b3303cfc8'
...
* commit 'a1ee1648690726b34e98eaf8db04fd7b3303cfc8':
lavc/decode_video(): always unref the frame if there is no output in decode_video
Conflicts:
libavcodec/utils.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-09 17:48:24 +01:00
Michael Niedermayer
04dac5d1e0
Merge commit '85f947aefb3dae81f65f518acdffa8e31c679654'
...
* commit '85f947aefb3dae81f65f518acdffa8e31c679654':
lavc: remove a pointless check in decode_audio4()
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-09 16:13:42 +01:00
Michael Niedermayer
f4332e9591
Merge commit 'd4f0f2d1e80b76260eb6b9cdde472ac069dfda56'
...
* commit 'd4f0f2d1e80b76260eb6b9cdde472ac069dfda56':
lavc: use buf[0] instead of data[0] as the indicator of an allocated frame
Conflicts:
libavcodec/utils.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-09 16:07:17 +01:00
Michael Niedermayer
cefabaad3e
Merge commit 'e5419709f50593769037ab77d7102f82d9260784'
...
* commit 'e5419709f50593769037ab77d7102f82d9260784':
lavc: remove the extended_data workarounds.
Conflicts:
libavcodec/utils.c
One hunk is not merged as not all codecs are updated yet
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-09 14:32:19 +01:00
Anton Khirnov
37a749012a
lavc: rework handling of refcounted_frames=0
...
Use only proper AVFrame API (no assigning of whole frames, since that
hardcodes sizeof(AVFrame) into lavc).
Make a copy of the side data, so the caller can use av_frame_unref/free
on non-refcounted frames, eliminating the need for
avcodec_get_frame_defaults()/avcodec_free_frame().
2013-12-09 08:54:29 +01:00
Anton Khirnov
a1ee164869
lavc/decode_video(): always unref the frame if there is no output in decode_video
...
Not just on failure. This is the same thing that is done in the audio
path and should prevent leaks in decoders that allocate a frame, but
then end up not writing into it.
2013-12-09 08:44:34 +01:00
Anton Khirnov
85f947aefb
lavc: remove a pointless check in decode_audio4()
...
av_frame_unref() works fine on unallocated frames.
2013-12-09 08:44:24 +01:00
Anton Khirnov
d4f0f2d1e8
lavc: use buf[0] instead of data[0] as the indicator of an allocated frame
...
data[0] may be NULL for valid frames with hwaccel pixel formats.
2013-12-09 08:44:11 +01:00
Anton Khirnov
e5419709f5
lavc: remove the extended_data workarounds.
...
All decoders should now handle it properly.
2013-12-09 08:42:52 +01:00
Michael Niedermayer
133fbfc781
do O(1) instead of O(n) atomic operations in register functions
...
about 1ms faster startup time
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-06 15:27:36 +01:00
Michael Niedermayer
fdc0b3f8c1
avcodec/utils: remove unused variable
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-11-21 14:17:00 +01:00
Michael Niedermayer
01923bab98
avcodec: move end zeroing code from av_packet_split_side_data() to avcodec_decode_subtitle2()
...
This code changes the input packet, which is read only and can in
rare circumstances lead to decoder errors. (i run into one of these in
the audio decoder, which corrupted the packet during av_find_stream_info()
so that actual decoding that single packet failed later)
Until a better fix is implemented, this commit limits the problem.
A better fix might be to make the subtitle decoders not depend on
data[size] = 0 or to copy their input when this is not the case.
2013-11-21 03:13:26 +01:00
Ben Boeckel
34b7c82dd3
avcodec/utils: use the unpack_dictionary function
...
Signed-off-by: Ben Boeckel <mathstuf@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-11-20 18:23:24 +01:00
Michael Niedermayer
29c83d23e8
Merge commit 'b9fb59d2ab05fdfe89d3fb0d7ecbbd91e560f57d'
...
* commit 'b9fb59d2ab05fdfe89d3fb0d7ecbbd91e560f57d':
lavc: deprecate avcodec_alloc_frame().
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-11-17 00:01:23 +01:00
Michael Niedermayer
0ee905e243
Merge commit '5b9c3b4505206143d85398c1410949319fa1180f'
...
* commit '5b9c3b4505206143d85398c1410949319fa1180f':
Replace all instances of avcodec_alloc_frame() with av_frame_alloc().
Conflicts:
doc/examples/decoding_encoding.c
doc/examples/muxing.c
ffmpeg.c
libavcodec/alacenc.c
libavcodec/libopenjpegenc.c
libavcodec/libvpxenc.c
libavcodec/pcm.c
libavcodec/xbmenc.c
libavcodec/xwdenc.c
libavformat/utils.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-11-16 23:54:10 +01:00
Anton Khirnov
b9fb59d2ab
lavc: deprecate avcodec_alloc_frame().
2013-11-16 12:44:50 +01:00
Anton Khirnov
5b9c3b4505
Replace all instances of avcodec_alloc_frame() with av_frame_alloc().
2013-11-16 12:44:20 +01:00
Michael Niedermayer
7c888ae746
Merge commit 'cce3e0a49f0dd030262c28d9c53de0bd2fd909c4'
...
* commit 'cce3e0a49f0dd030262c28d9c53de0bd2fd909c4':
Move av_fast_{m,re}alloc from lavc to lavu.
Conflicts:
libavcodec/avcodec.h
libavcodec/utils.c
libavutil/mem.c
libavutil/version.h
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-11-14 15:04:04 +01:00
Anton Khirnov
cce3e0a49f
Move av_fast_{m,re}alloc from lavc to lavu.
2013-11-14 09:42:22 +01:00
Michael Niedermayer
78e150c5e9
Merge remote-tracking branch 'qatar/master'
...
* qatar/master:
hwaccel: Simplify ff_find_hwaccel
Conflicts:
libavcodec/mpeg12dec.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-11-10 17:37:51 +01:00
Luca Barbato
08303d7741
hwaccel: Simplify ff_find_hwaccel
...
It is always called by passing fields from an AVCodecContext.
2013-11-10 13:59:48 +01:00
Michael Niedermayer
ab71be0912
Merge commit 'da6506c607eda585ba4b15430cf3c9a2ce09c3a9'
...
* commit 'da6506c607eda585ba4b15430cf3c9a2ce09c3a9':
lavc: move AVCodecContext.pkt to AVCodecInternal
Conflicts:
libavcodec/internal.h
libavcodec/rawdec.c
libavcodec/utils.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-11-04 11:41:55 +01:00
Michael Niedermayer
3fc26d8073
Merge commit '38ecc3702dabbea09230f6d6333f59e74f5d1c12'
...
* commit '38ecc3702dabbea09230f6d6333f59e74f5d1c12':
pthread: store thread contexts in AVCodecInternal instead of AVCodecContext
Conflicts:
libavcodec/internal.h
libavcodec/utils.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-11-04 11:14:38 +01:00
Anton Khirnov
da6506c607
lavc: move AVCodecContext.pkt to AVCodecInternal
...
It's a private field, not meant to be accessed from outside lavc.
2013-11-04 08:51:26 +01:00
Anton Khirnov
38ecc3702d
pthread: store thread contexts in AVCodecInternal instead of AVCodecContext
...
It's a private field, it should not be visible to callers.
Deprecate AVCodecContext.thread_opaque
2013-11-04 08:51:26 +01:00
Stefano Sabatini
a689560428
lavc: remove dead FF_API_AVCODEC_OPEN API
2013-11-03 17:58:44 +01:00
Michael Niedermayer
5eb1704d5f
Merge commit '064698d381e1e7790f21b0199a8930ea04e2e942'
...
* commit '064698d381e1e7790f21b0199a8930ea04e2e942':
Add HEVC decoder
Conflicts:
Changelog
libavcodec/Makefile
libavcodec/allcodecs.c
libavcodec/hevc.c
libavcodec/hevc.h
libavcodec/hevc_cabac.c
libavcodec/hevc_filter.c
libavcodec/hevc_mvs.c
libavcodec/hevc_parser.c
libavcodec/hevc_ps.c
libavcodec/hevc_refs.c
libavcodec/hevc_sei.c
libavcodec/hevcdsp.c
libavcodec/hevcdsp_template.c
libavcodec/hevcpred.c
libavcodec/hevcpred_template.c
libavcodec/version.h
cosmetics from hevc.h & hevc_ps.c mostly merged, other files left as they where in ffmpeg.
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-11-01 17:13:00 +01:00
Michael Niedermayer
66f436adf5
Merge commit '0f6c1d6d64c9f6255ea579dace27d0dd695f0213'
...
* commit '0f6c1d6d64c9f6255ea579dace27d0dd695f0213':
lavc/utils: stop using deprecated avcodec_set_dimensions
Conflicts:
libavcodec/utils.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-11-01 13:21:14 +01:00
Michael Niedermayer
7b91e9cf5d
Merge commit '7644f5a80787c9b608b82873604805d7e38a6a18'
...
* commit '7644f5a80787c9b608b82873604805d7e38a6a18':
lavc: replace avcodec_set_dimensions with ff_set_dimensions
Conflicts:
libavcodec/utils.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-11-01 13:07:15 +01:00
Anton Khirnov
0f6c1d6d64
lavc/utils: stop using deprecated avcodec_set_dimensions
2013-10-31 20:14:14 +01:00
Anton Khirnov
7644f5a807
lavc: replace avcodec_set_dimensions with ff_set_dimensions
...
avcodec_set_dimensions() is supposed to be an internal utility function,
there is no reason whatsoever for it to be public. Therefore deprecate
it.
2013-10-31 20:14:14 +01:00
Michael Niedermayer
558784f113
Merge commit 'b9589f5a770ec2357ab7920a5fabe8510b8601f9'
...
* commit 'b9589f5a770ec2357ab7920a5fabe8510b8601f9':
lavc: add error checking to apply_param_change.
Conflicts:
libavcodec/utils.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-10-30 10:23:24 +01:00
Anton Khirnov
b9589f5a77
lavc: add error checking to apply_param_change.
2013-10-30 08:43:03 +01:00
Marton Balint
dbe6f9f2c2
lavc: add support for CODEC_CAP_DELAY in subtitles
...
This patch adds CODEC_CAP_DELAY support to avcodec_decode_subtitle2.
For DVB teletext decoding, a single teletext packet can contain multiple
teletext pages. In order to support that, the teletext decoder may buffer
some pages.
Signed-off-by: Marton Balint <cus@passwd.hu>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-10-27 23:12:41 +01:00
Michael Niedermayer
094c40ca37
avcodec/utils: use a default lock manager that uses a pthread mutex
...
That makes avformat & avcodec thread safe without the need to explicitly
register a lock manager.
Reviewed-by: wm4 <nfxjfg@googlemail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-10-23 16:38:06 +02:00
Mickaël Raulet
e146c326b9
avcodec/pthread: add wpp api
...
cherry picked from commit c7765f3295fe7dc0653161c6a3d3e1778b76ee67
cherry picked from commit 0008c4979fc1d1bc24d4d2c791715f6dd017563c
Conflicts:
libavcodec/utils.c
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-10-22 19:55:47 +02:00
Marton Balint
b2d9790c2b
lavc: make avcodec_decode_subtitle2 more robust
...
Signed-off-by: Marton Balint <cus@passwd.hu>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-10-20 20:35:31 +02:00
Michael Niedermayer
838f461b07
avcodec/utils: add some saftey checks to add_metadata_from_side_data()
...
This fixes potential overreads with crafted files.
Found-by: wm4
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-10-19 17:58:47 +02:00
Vignesh Venkatasubramanian
0f99aad80f
lavc: Adding seek_preroll to AVCodecContext
...
seek_preroll field is added to the AVCodecContext struct. It indicates
the number of samples to be discarded whenever there is a discontinuity.
The minor version is bumped accordingly.
Signed-off-by: Vignesh Venkatasubramanian <vigneshv@google.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-10-14 18:46:12 +02:00
Michael Niedermayer
e57dba0d52
avcodec: add av_codec_get_max_lowres()
...
Reviewed-by: Stefano Sabatini <stefasab@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-10-03 16:33:09 +02:00
Michael Niedermayer
b654aa6beb
Merge commit '7e52080cb18332cb1da9fe133498750b6b4b0fb3'
...
* commit '7e52080cb18332cb1da9fe133498750b6b4b0fb3':
pcm: support 24-bit/32-bit little-endian planar
Conflicts:
doc/general.texi
libavcodec/Makefile
libavcodec/allcodecs.c
libavcodec/avcodec.h
libavcodec/pcm.c
libavcodec/version.h
libavformat/nut.c
See: 467dfd5dfa
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-27 13:05:05 +02:00
Paul B Mahol
7e52080cb1
pcm: support 24-bit/32-bit little-endian planar
...
Used by LXF.
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2013-09-27 01:33:45 +02:00
Michael Niedermayer
a072acb108
avcodec: fix duplicate includes
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-21 16:59:13 +02:00
Michael Niedermayer
9c8aeacf82
avutil: add av_get_colorspace_name()
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-19 22:14:13 +02:00
Michael Niedermayer
b26ccf218d
Merge commit 'c4bfa098072ba338d83555d6e2199f7e1e64ffff'
...
* commit 'c4bfa098072ba338d83555d6e2199f7e1e64ffff':
Add a WebP decoder
Conflicts:
Changelog
doc/general.texi
libavcodec/Makefile
libavcodec/avcodec.h
libavcodec/version.h
libavformat/img2.c
The previously existing webp decoder is disabled as the new
one supports lossless mode and alpha while the previous does not.
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-19 12:36:11 +02:00
Michael Niedermayer
7bc9fb8cde
avcodec/utils: add 16bit planar YUV formats to avcodec_align_dimensions2()
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-11 02:45:17 +02:00
Vignesh Venkatasubramanian
889bc79b5f
lavc/utils: Add support for discarding samples from the end
...
Adding support for discarding samples from the end based on the value in
AV_PKT_DATA_SKIP_SAMPLES side data's bytes 5-8.
Signed-off By: Vignesh Venkatasubramanian <vigneshv@google.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-10 22:53:21 +02:00
Michael Niedermayer
9a0e20817a
avcodec/util: Make size argument of ff_alloc_packet2() int64_t
...
This ensures that huge sizes dont get truncated before the check in ff_alloc_packet2()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-09 20:18:54 +02:00
Clément Bœsch
3e1f507f3e
avcodec: make avcodec_close() more tolerant.
...
See previous commit.
2013-09-04 22:06:38 +02:00
Carl Eugen Hoyos
6fcfafff84
Show subtitle resolution in avcodec_string().
2013-09-04 01:04:01 +02:00
Michael Niedermayer
8da23be458
avcodec/utils: avcodec_string: print colorspace type
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-08-31 17:22:04 +02:00
Michael Niedermayer
ea07dbdeaa
avcodec/utils: avcodec_string: Print color_range
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-08-31 17:21:20 +02:00
Michael Niedermayer
336982a0ce
avcodec/utils: avcodec_string: make the colorspace printing code more extendible.
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-08-31 17:00:00 +02:00
Michael Niedermayer
811d58e083
avcodec/utils: support non edge emu for grayscale
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-08-29 22:52:04 +02:00
Michael Niedermayer
3d842cf827
Merge remote-tracking branch 'qatar/master'
...
* qatar/master:
avcodec/utils: Simplify a condition that combines HAVE_NEON and ARCH_ARM
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-08-21 13:08:55 +02:00
Diego Biurrun
e95930eda1
avcodec/utils: Simplify a condition that combines HAVE_NEON and ARCH_ARM
2013-08-21 09:40:39 +02:00
Thilo Borgmann
f18ccb529f
Fix wrong use of "an" in some comments.
2013-08-12 03:27:26 +02:00
Michael Niedermayer
98fd8a7848
avcodec: Remove ff_packet_free_side_data, use av_packet_free_side_data
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-08-12 00:13:21 +02:00
Reimar Döffinger
d4db7c334b
Integrate accessors.h header into internal.h
...
I have no idea why I added a separate header,
I think there is no good reason for it.
Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
2013-08-10 07:56:42 +02:00
Reimar Döffinger
a48979d715
Reduce MAKE_ACCESSORS code duplication via a new header.
...
Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
2013-08-08 20:32:40 +02:00
Michael Niedermayer
20be5e0a0e
Merge commit '7950e519bb094897f957b9a9531cc60ba46cbc91'
...
* commit '7950e519bb094897f957b9a9531cc60ba46cbc91':
Disable deprecation warnings for cases where a replacement is available
Conflicts:
libavcodec/avpacket.c
libavcodec/pthread.c
libavcodec/utils.c
libavdevice/v4l2.c
libavfilter/avfiltergraph.c
libavfilter/buffersrc.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-08-03 10:08:30 +02:00
Diego Biurrun
7950e519bb
Disable deprecation warnings for cases where a replacement is available
2013-08-02 19:19:02 +02:00
Marton Balint
63c0113588
lavc: do not override format if neither text nor bitmap codec prop is set
...
Some decoders may output both, this way the decoder can set it.
Signed-off-by: Marton Balint <cus@passwd.hu>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-07-27 23:03:00 +02:00
Carl Eugen Hoyos
9375879d57
Show max bitrate for mpeg2 video streams in avcodec_string().
...
See also 25b7aa9
2013-07-25 19:08:19 +02:00
Michael Niedermayer
274a50ab57
avcodec/utils: Warn the user about the lack of a lock manager if insufficient locks are detected
...
A lock manager is not the only possibility to avoid open/close locking
issues but its easier and more robust than maintaining a lot of lock/unlock
calls.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-07-24 01:11:09 +02:00
Michael Niedermayer
55db06af64
avcodec/utils: use av_assert0() to check validity of input pointers for start code search
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-07-23 21:23:09 +02:00
Michael Niedermayer
abc8110f7e
avcodec: add avcodec_chroma_pos_to_enum()
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-07-23 03:11:28 +02:00
Michael Niedermayer
b7397857e2
avcodec: add avcodec_enum_to_chroma_pos()
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-07-23 03:07:30 +02:00
Michael Niedermayer
a80e622924
avcodec/avutil: Add AVColorSpace and AVColorRange to AVFrames
...
This also moves AVColorSpace and AVColorRange from avcodec to avutil
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-07-17 01:15:31 +02:00
Paul B Mahol
6516a25f04
ADPCM IMA WAV 2, 3 and 5 bits decoder
...
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2013-07-05 18:10:27 +00:00
Carl Eugen Hoyos
b42bcaef29
Avoid a null pointer dereference in avcodec_decode_audio4().
...
This could happen if oom occured while probing a file.
Fixes ticket #2722 .
2013-07-01 03:07:44 +02:00
Michael Niedermayer
8738d94274
avcodec: Make av_register_hwaccel() and avcodec_register() thread safe
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-06-29 03:28:58 +02:00
Carl Eugen Hoyos
41f3c60fbb
Avoid a null pointer dereference in avcodec_decode_video2().
...
This could happen if oom occured while probing a file.
Reported in ticket #1900 .
2013-06-28 09:04:43 +02:00
Stefano Sabatini
47c9887eca
lavc/utils: improve feedback in case of invalid packet size
2013-06-26 23:22:13 +02:00
Anton Khirnov
720a1de52f
lavc: free the padded last frame during audio encoding properly
2013-06-20 16:49:11 +02:00
Michael Niedermayer
a4a2e894fc
Merge commit '985f34b75653d02eda8eb8def3412f8577f19b01'
...
* commit '985f34b75653d02eda8eb8def3412f8577f19b01':
utils: fix avcodec_flush_buffers pre-reference counting compatibility
Conflicts:
libavcodec/utils.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-06-17 00:21:22 +02:00
Janne Grunau
985f34b756
utils: fix avcodec_flush_buffers pre-reference counting compatibility
...
The to_free AVframe must be freed just like the other ones.
Indeed, the calling application may expect all frames to be
released.
(This regression caused use-after-free in VLC with hwaccel.)
Signed-off-by: Rémi Denis-Courmont <remi@remlab.net>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2013-06-16 15:10:58 +02:00
Michael Niedermayer
7fff3df6b2
avcodec_encode_audio2: fix memleak on last padded frame
...
Regression introduced by 799f57ac96
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-06-14 15:21:23 +02:00
Michael Niedermayer
5d199c3ad9
Merge commit '799f57ac96f9891d1a0f7d6c4b218ed536e8aca5'
...
* commit '799f57ac96f9891d1a0f7d6c4b218ed536e8aca5':
lavc: use AVFrame API properly in pad_last_frame().
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-06-11 09:27:04 +02:00
Michael Niedermayer
175e916fa2
avcodec/utils: Fix encoder allocation size
...
Fixes Ticket2645
Found-by: Darrell Walisser
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-06-11 01:15:39 +02:00
Anton Khirnov
799f57ac96
lavc: use AVFrame API properly in pad_last_frame().
...
This also simplifies the code.
2013-06-10 21:19:51 +02:00
Paul B Mahol
d5f7f1fef1
audio frame multi-threaded decoding
...
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2013-06-05 22:35:31 +00:00
Michael Niedermayer
e5cdf9c03b
Merge commit '2d66a58ccde05e764594bd7e5f0f9244634d0b2c'
...
* commit '2d66a58ccde05e764594bd7e5f0f9244634d0b2c':
Go2Webinar decoder
Conflicts:
Changelog
configure
libavcodec/avcodec.h
libavcodec/codec_desc.c
libavcodec/version.h
libavformat/riff.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-06-03 12:47:26 +02:00
Michael Niedermayer
a90baa63c3
add YUVJ411P
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-05-21 12:56:11 +02:00
Michael Niedermayer
5e29e91232
avcodec_align_dimensions2: add missing yuva formats
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-05-18 16:21:09 +02:00
Michael Niedermayer
ed0aed09e8
Merge remote-tracking branch 'qatar/master'
...
* qatar/master:
Escape 130 (RPL) decoder
Conflicts:
libavcodec/Makefile
libavcodec/allcodecs.c
libavcodec/codec_desc.c
libavcodec/escape130.c
libavcodec/version.h
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-05-18 14:31:01 +02:00
Michael Niedermayer
36d349034e
Merge commit '30e256430eb88c6d4c382581b89bca171d79fbc0'
...
* commit '30e256430eb88c6d4c382581b89bca171d79fbc0':
lavc/pthread: remove obsolete checks
Conflicts:
libavcodec/utils.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-05-17 11:49:00 +02:00
Anton Khirnov
30e256430e
lavc/pthread: remove obsolete checks
...
Those were useful when avcodec_thread_init() was a public functions. It
was deprecated and removed some time ago, so those checks are not needed
anymore.
2013-05-17 07:44:40 +02:00
Michael Niedermayer
c7c71f95f8
replace remaining PIX_FMT_* flags with AV_PIX_FMT_FLAG_*
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-05-15 11:23:14 +02:00
Michael Niedermayer
ff4680922f
Merge remote-tracking branch 'qatar/master'
...
* qatar/master:
pixdesc: rename PIX_FMT_* flags to AV_PIX_FMT_FLAG_*
Conflicts:
doc/APIchanges
libavcodec/avpicture.c
libavcodec/ffv1dec.c
libavcodec/ffv1enc.c
libavcodec/imgconvert.c
libavcodec/tiffenc.c
libavfilter/vf_pixdesctest.c
libavfilter/vf_scale.c
libavutil/imgutils.c
libavutil/pixdesc.c
libavutil/version.h
libswscale/swscale_internal.h
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-05-15 11:10:09 +02:00
Michael Niedermayer
6bf6b9c279
Merge commit '252c0bfdc014c1fb6ad4fe06242c7beca58a6b41'
...
* commit '252c0bfdc014c1fb6ad4fe06242c7beca58a6b41':
lavc: Fix msvc compilation of utils.c with -WX (warnings treated as errors)
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-05-15 09:39:07 +02:00
Anton Khirnov
e6c4ac7b5f
pixdesc: rename PIX_FMT_* flags to AV_PIX_FMT_FLAG_*
2013-05-15 07:46:51 +02:00
Matt Wolenetz
252c0bfdc0
lavc: Fix msvc compilation of utils.c with -WX (warnings treated as errors)
...
This fixes https://bugzilla.libav.org/show_bug.cgi?id=514 .
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-05-14 10:04:43 +03:00
James Almer
67fad0d221
ADPCM IMA Radical decoder
...
Signed-off-by: James Almer <jamrial@gmail.com>
2013-05-10 16:53:50 -03:00
James Almer
e7814ed839
ADPCM DTK decoder
...
Signed-off-by: James Almer <jamrial@gmail.com>
2013-05-10 16:10:51 -03:00
Clément Bœsch
570d63eef3
lavu: add FF_CEIL_RSHIFT and use it in various places.
2013-05-09 16:59:42 +02:00
Paul B Mahol
5c057433cc
libswscale: GBRAP input & output and GBRAP16 input support
...
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2013-05-08 12:48:05 +00:00
Michael Niedermayer
fe6a36e768
Merge commit 'e55e8b2c362a60bad66929d83d8c83b0d7f5ffc9'
...
* commit 'e55e8b2c362a60bad66929d83d8c83b0d7f5ffc9':
lavc: do not leak frames in avcodec_decode_audio4
Conflicts:
libavcodec/utils.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-05-08 13:25:19 +02:00
Luca Barbato
e55e8b2c36
lavc: do not leak frames in avcodec_decode_audio4
...
Notwithstanding the return value the frame should be freed if
is not going to be used.
Reported-by: Matthew Wolenetz <wolenetz@chromium.org>
2013-05-07 14:37:32 +02:00
Matt Wolenetz
004779cc59
avcodec/utils: Fix leak by dereferencing audio frame when side data causes whole frame skip
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-05-07 01:33:08 +02:00
Michael Niedermayer
cdfa1c89b7
avcodec: Set frame.width/height on all exit pathes of ff_get_buffer()
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-05-05 14:23:16 +02:00
Michael Niedermayer
0aa095483d
Merge commit '6fee1b90ce3bf4fbdfde7016e0890057c9000487'
...
* 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>
2013-05-05 11:34:29 +02:00
Diego Biurrun
6fee1b90ce
avcodec: Add av_cold attributes to init functions missing them
2013-05-04 21:09:45 +02:00
Michael Niedermayer
2ee29b5fb9
avcodec: move lowres down with the next ABI bump and add accessors
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-05-03 11:32:04 +02:00
Michael Niedermayer
04fa818779
Merge commit '088f38a4f9f54bb923405c67c9e72d96d90aa284'
...
* 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>
2013-05-01 18:16:32 +02:00
Michael Niedermayer
52fa2945b5
Merge commit 'e036bb7899d0faca9159206be9bf5552e76e7633'
...
* 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>
2013-05-01 10:00:08 +02:00
Diego Biurrun
088f38a4f9
avcodec: Drop unnecessary ff_ name prefixes from static functions
2013-04-30 16:02:02 +02:00
Anton Khirnov
e036bb7899
lavc: clear AVBuffers on decoded frames if refcounted_frames is not set
...
Otherwise some code might mistakenly think it is allowed to unref those
buffers, which would lead to double unref.
2013-04-30 11:15:32 +02:00
Michael Niedermayer
24bb01f038
avcodec_string: Print the used codec if it differs from the codec_id name.
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-04-27 00:49:14 +02:00
Michael Niedermayer
59a3b6b751
avcodec_string: remove the "(hq)" listing
...
printing "hq" depending on a single video encoding parameter makes
little sense
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-04-27 00:49:12 +02:00
Nicolas George
70feca926b
lavc: check decoded subtitles encoding.
...
Address trac ticket #2431 .
2013-04-24 19:41:27 +02:00
Michael Niedermayer
05b2c998c7
avcodec: Fix lowres handling in buffer allocation
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-04-19 21:49:36 +02:00
Michael Niedermayer
a8b05dde0d
Merge commit 'a7f46586bf47174b5fa00a905b767b1781ec8b72'
...
* commit 'a7f46586bf47174b5fa00a905b767b1781ec8b72':
ff_get_buffer(): allocate the frame for max(coded,display) dimensions
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-04-19 21:49:29 +02:00
Anton Khirnov
a7f46586bf
ff_get_buffer(): allocate the frame for max(coded,display) dimensions
...
Needed e.g. for h264 cropping to work properly.
2013-04-19 09:26:53 +02:00
Clément Bœsch
7b80b3cef0
lavc/utils: merge side data after video encode.
...
This allows encoders to communicate side data to the muxers.
2013-04-19 02:10:12 +02:00
Paul B Mahol
b05d8d4cf4
lavc: avcodec_open2(): pass context to av_log()
...
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2013-04-16 20:46:34 +00:00
Reimar Döffinger
c10d498bfd
Add thread-safe wrapper for get_format().
...
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>
2013-04-15 09:04:07 +02:00
Anton Khirnov
9de9b828ef
lavc: don't overwrite display dimensions with coded dimensions.
2013-04-10 20:54:27 +02:00
Ronald S. Bultje
b93b27edb0
dsputil: Make dsputil selectable
...
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-04-10 11:04:05 +03:00
Nicolas George
0884d04dc3
lavc: fix recoded subtitles end.
...
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 .
2013-04-07 13:25:24 +02:00
Nicolas George
83affcde51
lavc: use packet duration for subtitles if necessary.
...
Fix trac ticket #2397 .
2013-04-04 14:04:51 +02:00
Nicolas George
464f94b206
lavc: do not init frame with guessed layout.
...
It is breaking support from files with unknown layout.
2013-04-03 17:44:10 +02:00
Michael Niedermayer
12f203a098
Merge commit 'c24469e812501903a46a06eff9722a82e136e841'
...
* 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>
2013-03-27 11:42:15 +01:00
Janne Grunau
c24469e812
utils: add workaround for AVHWAccel in ff_get_buffer compat code
...
Since c977039e58
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.
2013-03-26 19:44:50 +01:00
Michael Niedermayer
b19604cc4b
Merge commit 'f1e9398621af0bc9d166014e4ce6996bb4f141d0'
...
* 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>
2013-03-26 13:44:09 +01:00
Michael Niedermayer
2cdedcbcea
Merge commit '75644335b907919057960716508477239c26fed4'
...
* 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>
2013-03-26 13:22:48 +01:00
Martin Storsjö
f1e9398621
lavc: Rename avpriv_mpv_find_start_code after moving out from mpegvideo
...
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>
2013-03-26 09:50:02 +02:00
Martin Storsjö
75644335b9
lavc: Move start code finding to utils.c
...
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>
2013-03-26 09:48:12 +02:00
Michael Niedermayer
01df2a13c3
avcodec/utils: initialize pixel buffer pool
...
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>
2013-03-25 00:43:14 +01:00
Carl Eugen Hoyos
ac9b056ddb
Do not fail in get_buffer_internal() if pix_fmt planes == 0.
...
Fixes VDPAU decoding, reported by Ilja Sekler
2013-03-22 01:03:07 +01:00
Clément Bœsch
4331484b8d
lavc/utils: fix metadata audio frame memleak in case of non refcounted frames.
...
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>
2013-03-21 01:07:51 +01:00
Michael Niedermayer
df804041bd
Merge commit '6599b087de62a5f9f2a8d61a1952d777d1bff804'
...
* commit '6599b087de62a5f9f2a8d61a1952d777d1bff804':
buffersrc: fix a typo.
lavc, lavfi: fix counting number of planes in AVBufferRef wrappers
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-03-20 11:30:56 +01:00
Stefano Sabatini
33b0549867
lavc/utils: add VP6F hack for setting correct video size in stream
...
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
2013-03-19 23:28:08 +01:00
Michael Niedermayer
2c993fece2
audio_get_buffer: add assert to ensure nb_extended_buf has a safe value
...
May silence CID991853
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-03-19 14:33:47 +01:00
Anton Khirnov
c977039e58
lavc, lavfi: fix counting number of planes in AVBufferRef wrappers
...
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.
2013-03-19 11:12:17 +01:00
Clément Bœsch
4b35be3251
lavc: fix avpacket memleak with subtitles recoding.
2013-03-18 22:04:29 +01:00
Michael Niedermayer
171bd38eda
Merge remote-tracking branch 'qatar/master'
...
* qatar/master:
lavc,lavfi: fix calculating the plane size in the AVBufferRef wrappers
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-03-17 12:59:04 +01:00
Anton Khirnov
6552808014
lavc,lavfi: fix calculating the plane size in the AVBufferRef wrappers
...
It is supposed to be height * linesize, not width * linesize.
Thanks to Hendrik Leppkes for pointing out the bug.
2013-03-17 09:10:04 +01:00
Ronald S. Bultje
b76d853697
lavc: make compilation of frame_thread_encoder.o optional.
...
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>
2013-03-14 15:04:17 +01:00